/**
 * 
 */
package com.gopay.common.cps.dao.bt.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.bt.CpsBtCheckInInfoQueryDAO;
import com.gopay.common.domain.cps.CpsBtCheckInInfo;

/**
 * 大宗签到签退信息表
 * 
 * @CpsBtCheckInInfoQueryDAOImpl.java
 * @author xiefei
 * @2013-1-22 上午11:27:18 www.gopay.com.cn Inc.All rights reserved.
 */

@SuppressWarnings({ "unchecked", "rawtypes" })
@Repository("cpsBtCheckInInfoQueryDAO")
public class CpsBtCheckInInfoQueryDAOImpl extends BaseDAOImpl<CpsBtCheckInInfo, Serializable> implements
        CpsBtCheckInInfoQueryDAO {

    @Override
    public CpsBtCheckInInfo getByCustId(String custId) {

        String hql = "from CpsBtCheckInInfo info where info.marketCustId = :CustId";

        Map params = new HashMap();
        params.put("CustId", custId);

        List<CpsBtCheckInInfo> l = super.findByHql(hql, params);
        return l.size() > 0 ? l.get(0) : null;
    }

}
